<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <script type="text/javascript">
        window.onload= function () {
            img = document.getElementsByTagName('img');

            box = document.getElementById('box');

            son = document.getElementById('son');

            // img[0].src="dsfsdfsdf";

            obj = document.createElement('input');

            obj.value ="学并思";

            obj.id = "in";

            obj.name ="username";

            box.appendChild(obj);

            newObj = obj.cloneNode();

            box.appendChild(newObj);

            // box.replaceChild(obj,son);

            // box.appendChild(img[0]);
            // box.insertBefore(obj,img[0]);
        }
    </script>
</head>
<body>
    <img src="">
    <div id="box">
        <div id="son">son</div>
    </div>
</body>
</html>